<form class="form-horizontal" #producteditForm="ngForm">
  <div class="form-group" style="margin-top:30px">
    <label class="col-lg-2 text-right">
      <span class="span-style">*</span>组合名称</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" #sFullName="ngModel" maxlength="128" [(ngModel)]="annuityAddOrEditBody.sFullName"
        name="sFullName">
    </div>
    <label class="col-lg-2 text-right">组合代码</label>
    <div class="col-lg-3">
      <input class="form-control" [disabled]="index=='not-running' || index=='new'" type="text" #sFundCode="ngModel" maxlength="20"
        [(ngModel)]="annuityAddOrEditBody.sFundCode" name="sFundCode">
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">组合类型</label>
    <div class="col-lg-3">
      <select class="form-control" id="sProductTypeSelected" [(ngModel)]="annuityAddOrEditBody.sProductType" name="sProductType">
        <option [value]="''" selected>--请选择--</option>
        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.ANNUITY_TYPE">{{item.sItemValue}}</option>
      </select>
    </div>
    <label class="col-lg-2 text-right">
      <span class="span-style">*</span>合同名称</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" maxlength="128" [(ngModel)]="annuityAddOrEditBody.sContractName" name="sContractName">
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">委托人</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" maxlength="25" [(ngModel)]="annuityAddOrEditBody.sPrincipal" name="sPrincipal">
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">受托人</label>
    <div class="col-lg-3">
      <select class="form-control" id="sLinkPrincipalNoSelected" name="sLinkPrincipalNo" [(ngModel)]="annuityAddOrEditBody.sLinkPrincipalNo">
        <option [value]="''">--请选择--</option>
        <option [value]="item.sItemKey" *ngFor="let item of distionary.LINK_PRINCIPAL_NO">{{item.sItemValue}}</option>
      </select>
    </div>
    <label class="col-lg-2 text-right">投管人</label>
    <div class="col-lg-3">
      <select class="form-control select2 sInvest-select" multiple="multiple" [(ngModel)]="sInvestSelectLists" name="sInvest">
        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.INVEST">{{item.sItemValue}}</option>
      </select>
      <!-- <input class="form-control" type="text" maxlength="25" [(ngModel)]="annuityAddOrEditBody.sInvest" name="sInvest"> -->
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">托管人</label>
    <div class="col-lg-3">
      <select class="form-control" maxlength="25" id="sTrusteeSelected" [(ngModel)]="annuityAddOrEditBody.sTrustee" name="sTrustee">
        <option [value]="''">--请选择--</option>
        <option [value]="item.sItemKey" *ngFor="let item of distionary.TRUSTEE">{{item.sItemValue}}</option>
      </select>
    </div>
    <label class="col-lg-2 text-right">账管人</label>
    <div class="col-lg-3">
      <select class="form-control" id="sManagerSelected" [(ngModel)]="annuityAddOrEditBody.sManager" name="sManager">
        <option [value]="''">--请选择--</option>
        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.MANAGER">{{item.sItemValue}}</option>
      </select>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">项目经理</label>
    <div class="col-lg-3">
      <select class="form-control select2 manager-select" multiple="multiple" [(ngModel)]="managerSelectList" name="sProjectManager">
        <option [value]="item.sUserName" *ngFor="let item of ProjectManagerList">{{item.sRealName}}</option>
      </select>
    </div>
    <label class="col-lg-2 text-right">投资经理</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" [(ngModel)]="annuityAddOrEditBody.sManagerNo" name="sManagerNo" [attr.title]="annuityAddOrEditBody.sManagerNo"
        disabled>
    </div>
  </div>

  <div style="border-top: 1px solid #ddd;width:90%;margin-left:3%;margin-bottom:15px"></div>

  <div class="form-group">
    <label class="col-lg-2 text-right">备案机构</label>
    <div class="col-lg-3">
      <select class="form-control" id="sRecordorgTypeSelected" [(ngModel)]="annuityAddOrEditBody.sRecordorgType" name="sRecordorgType">
        <option [value]="''">--请选择--</option>
        <option [value]="item.sItemKey" *ngFor="let item of distionary.RECORDORG_TYPE">{{item.sItemValue}}</option>
      </select>
    </div>
    <label class="col-lg-2 text-right">计划登记号</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" maxlength="10" [(ngModel)]="annuityAddOrEditBody.sPlanNo" name="sPlanNo">
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">所属地区</label>
    <div class="col-lg-3">
      <app-area-data-cn [code]="area" name="sArea" [attr.title]="annuityAddOrEditBody.sArea.split(',')[1]" (areaChange)="OnAreaChg($event)"
        (codeChange)="OnAreaCodeChg($event)"></app-area-data-cn>
    </div>
    <label class="col-lg-2 text-right">所属行业</label>
    <div class="col-lg-3">
      <select class="form-control" id="sCallingSelected" [(ngModel)]="annuityAddOrEditBody.sCalling" name="sCalling">
        <option [value]="''">--请选择--</option>
        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.CALLING">{{item.sItemValue}}</option>
      </select>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">是否央企</label>
    <div class="col-lg-3">
      <select class="form-control" id="sIsCentralEnterpriserSelected" [(ngModel)]="annuityAddOrEditBody.sIsCentralEnterpriser"
        name="sIsCentralEnterpriser">
        <option [value]="''">--请选择--</option>
        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.CENTRAL_ENTERPRISER">{{item.sItemValue}}</option>
      </select>
    </div>
  </div>

  <div style="border-top: 1px solid #ddd;width:90%;margin-left:3%;margin-bottom:15px"></div>

  <div class="form-group">
    <label class="col-lg-2 text-right">签约日期</label>
    <div class="col-lg-3">
      <div class="input-group date form_datetime">
        <span class="input-group-addon">
          <i class="fa fa-calendar"></i>
        </span>
        <input class="form-control" type="text" style="background: white; cursor: pointer;" [(ngModel)]="annuityAddOrEditBody.dSign"
          mwlFlatpickr [ngModelOptions]="{standalone: false}" name="dSign">
      </div>
    </div>
    <label class="col-lg-2 text-right">确认日期</label>
    <div class="col-lg-3">
      <div class="input-group date form_datetime">
        <span class="input-group-addon">
          <i class="fa fa-calendar"></i>
        </span>
        <input class="form-control" type="text" style="background: white; cursor: pointer;" [(ngModel)]="annuityAddOrEditBody.dConfirm"
          mwlFlatpickr [ngModelOptions]="{standalone: false}" name="dConfirm">
      </div>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">生效日期</label>
    <div class="col-lg-3">
      <div class="input-group date form_datetime">
        <span class="input-group-addon">
          <i class="fa fa-calendar"></i>
        </span>
        <input class="form-control" type="text" style="background: white; cursor: pointer;" [(ngModel)]="annuityAddOrEditBody.dEffective"
          mwlFlatpickr [ngModelOptions]="{standalone: false}" name="dEffective">
      </div>
    </div>
    <label class="col-lg-2 text-right">运作日期</label>
    <div class="col-lg-3">
      <div class="input-group date form_datetime">
        <span class="input-group-addon">
          <i class="fa fa-calendar"></i>
        </span>
        <input class="form-control" style="background: white; cursor: pointer;" [(ngModel)]="annuityAddOrEditBody.dBegin" mwlFlatpickr
          [ngModelOptions]="{standalone: false}" name="dBegin" id="dBegin">
      </div>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">合同期限</label>
    <div class="col-lg-3">
      <select class="form-control" id="sTermTypeSelected" [(ngModel)]="annuityAddOrEditBody.sTermType" name="sTermType">
        <option [value]="''">--请选择--</option>
        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.TERM_TYPE">{{item.sItemValue}}</option>
      </select>
    </div>
    <label class="col-lg-2 text-right">合同到期日</label>
    <div class="col-lg-3">
      <div class="input-group date form_datetime">
        <span class="input-group-addon">
          <i class="fa fa-calendar"></i>
        </span>
        <input class="form-control" type="text" style="background: white; cursor: pointer;" [(ngModel)]="annuityAddOrEditBody.dEnd"
          mwlFlatpickr [ngModelOptions]="{standalone: false}" name="dEnd">
      </div>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">是否自动续约</label>
    <div class="col-lg-3">
      <select class="form-control" [(ngModel)]="annuityAddOrEditBody.sIsRenewal" name="sIsRenewal">
        <option [value]="''">--请选择--</option>
        <option value="1">是</option>
        <option value="0">否</option>
      </select>
    </div>
    <label class="col-lg-2 text-right">终止日期</label>
    <div class="col-lg-3">
      <div class="input-group date form_datetime">
        <span class="input-group-addon">
          <i class="fa fa-calendar"></i>
        </span>
        <input class="form-control" type="text" style="background: white; cursor: pointer;" [(ngModel)]="annuityAddOrEditBody.dStop"
          mwlFlatpickr [ngModelOptions]="{standalone: false}" name="dStop" id="dStop">
      </div>
    </div>
  </div>

  <div style="border-top: 1px solid #ddd;width:90%;margin-left:3%;margin-bottom:15px"></div>

  <div class="form-group">
    <label class="col-lg-2 text-right">业绩比较基准</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" maxlength="25" [attr.title]="annuityAddOrEditBody.sBenchmark" [(ngModel)]="annuityAddOrEditBody.sBenchmark"
        name="sBenchmark">
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">是否资产移交</label>
    <div class="col-lg-3">
      <select class="form-control" [(ngModel)]="annuityAddOrEditBody.sIsAssetTransfer" name="sIsAssetTransfer" (ngModelChange)="IsAssetTransfer()"
        [disabled]="index=='not-running' || index=='new'">
        <option [value]="1">是</option>
        <option [value]="0">否</option>
      </select>
    </div>
    <label class="col-lg-2 text-right">移交投管人</label>
    <div class="col-lg-3">
      <select class="form-control select2 sInvestor-select" multiple="multiple" [(ngModel)]="sInvestorSelectList" name="sInvestor"
        [disabled]="index=='not-running' || index=='new' || annuityAddOrEditBody.sIsAssetTransfer == '0'">
        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.OTHER_INVESTOR">{{item.sItemValue}}</option>
      </select>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">移交备注</label>
    <div class="col-lg-8">
      <textarea [disabled]="index=='not-running' || index=='new'" style="width:100%" cols="30" rows="3" maxlength="250" [(ngModel)]="annuityAddOrEditBody.sTransferRemark"
        name="sTransferRemark"></textarea>
    </div>
  </div>

  <div style="border-top: 1px solid #ddd;width:90%;margin-left:3%;margin-bottom:15px"></div>

  <div class="form-group">
    <label class="col-lg-2 text-right">净值大幅波动提醒</label>
    <div class="col-lg-8" (click)="showSNetValueModal()">
      <textarea style="width:100%" cols="30" rows="3" disabled maxlength="250" [(ngModel)]="annuityAddOrEditBody.sNetValueFluctuation"
        name="sNetValueFluctuation"></textarea>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">特殊服务条款</label>
    <div class="col-lg-8">
      <textarea style="width:100%" cols="30" rows="3" maxlength="250" [(ngModel)]="annuityAddOrEditBody.sSpecialTerms" name="sSpecialTerms"></textarea>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">续约条款</label>
    <div class="col-lg-8">
      <textarea style="width:100%" cols="30" rows="3" maxlength="250" [(ngModel)]="annuityAddOrEditBody.sRemark" name="sRemark"></textarea>
    </div>
  </div>
  <!-- <div class="form-group">
    <label class="col-lg-2 text-right">确认函号</label>
    <div class="col-lg-3">
      <input class="form-control" maxlength="20" type="text" [(ngModel)]="annuityAddOrEditBody.sConfirmationNo" name="sConfirmationNo">
    </div>
    <label class="col-lg-2 text-right">发行方式</label>
    <div class="col-lg-3">
      <select class="form-control" [(ngModel)]="annuityAddOrEditBody.sEmissionWay" name="sEmissionWay">
              <option [value]="''">--请选择--</option>
              <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.EMISSION_WAY">{{item.sItemValue}}</option>
            </select>
    </div>
  </div>

  <div class="form-group">
    <label class="col-lg-2 text-right">发行对象</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" maxlength="20" [(ngModel)]="annuityAddOrEditBody.sEmissionObject" name="sEmissionObject">
    </div>

  </div>

  <div style="border-top: 1px solid #ddd;width:80%;margin-left:7%;margin-bottom:15px"></div>

  <div class="form-group">
    <label class="col-lg-2 text-right">其他投资管理人</label>
    <div class="col-lg-3">
      <select class="form-control select2 investor-select" multiple="multiple" [(ngModel)]="investorSelectList" name="sOtherInvestor">
        <option [value]="item.sItemKey" *ngFor="let item of dictionaryList.OTHER_INVESTOR">{{item.sItemValue}}</option>
      </select>
    </div>
  </div>
  <div style="border-top: 1px solid #ddd;width:80%;margin-left:7%;margin-bottom:15px"></div>


  <div class="form-group">
    <label class="col-lg-2 text-right">管理费率(%)</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" maxlength="25" [(ngModel)]="annuityAddOrEditBody.sManageFee" name="sManageFee">
    </div>
    <label class="col-lg-2 text-right">业绩基准</label>
    <div class="col-lg-3">
      <input class="form-control" type="text" maxlength="25" [attr.title]="annuityAddOrEditBody.sAchieveMark" [(ngModel)]="annuityAddOrEditBody.sAchieveMark"
        name="sAchieveMark">
    </div>
  </div>
  <div class="form-group">
    <label class="col-lg-2 text-right">是否含权类</label>
    <div class="col-lg-3">
      <select class="form-control" [(ngModel)]="annuityAddOrEditBody.sIsContainRight" name="sIsContainRight">
        <option [value]="''">--请选择--</option>
        <option [value]="1">是</option>
        <option [value]="0">否</option>
      </select>
    </div>
  </div> -->
  <div class="form-group" style="margin-top: 15px">
    <div class="col-lg-1 col-lg-offset-5">
      <button type="button" *ngIf="operate=='add'" class="btn btn-primary" (click)="otmAddOrEditBasicInfo('add')">
        <i class="fa fa-save"></i>保存</button>
      <button *ngIf="operate=='edit'&&annuityAddOrEditBody.sStatus!='yzhzh'" type="button" class="btn btn-primary" (click)="otmAddOrEditBasicInfo('edit')">
        <i class="fa fa-save"></i>保存</button>
    </div>
  </div>
</form>


<div class="modal" id="sNetValueModal">
  <div class="modal-dialog" style="width:800px !important">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">净值大幅波动提醒</h4>
      </div>
      <div class="modal-body">
        <form class="form-inline" style="padding-bottom:10px;">
          <div class="form-group">
            单日下跌幅度超过
            <input class="form-control" type="text" style="width:80px;" pattern="^[0-9]+([.]{1}[0-9]+){0,1}$" #Number1="ngModel" maxlength="9" [(ngModel)]="number1" name="number1">%（含）,连续
            <input class="form-control" type="text" style="width:80px;" [min]="0" digits #Number2="ngModel" maxlength="9" [(ngModel)]="number2"
              name="number2">个交易日的区间内下跌幅度超
            <input class="form-control" type="text" style="width:80px;" pattern="^[0-9]+([.]{1}[0-9]+){0,1}$" #Number3="ngModel" maxlength="9" [(ngModel)]="number3" name="number3">%
          </div>
          <div class="form-group col-lg-4" style="padding-left:0px !important">
            <p *ngIf="Number1.errors?.pattern" class="errorTip" style="padding-left:80px">请输入正数</p>
          </div>
          <div class="form-group col-lg-4" style="padding-left:0px !important">
            <p *ngIf="Number2.errors?.digits" class="errorTip" style="padding-left:30px">请输入正整数</p>
          </div>
          <div class="form-group col-lg-4" style="padding-left:0px !important">
            <p *ngIf="Number3.errors?.pattern" class="errorTip" style="padding-left:30px">请输入正数</p>
          </div>
        </form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary" (click)="getSNetValue()" [disabled]="Number2.errors?.digits||Number1.errors?.pattern||Number3.errors?.pattern">确定</button>
      </div>
    </div>
    <!-- /.modal-content -->
  </div>
  <!-- /.modal-dialog -->
</div>
<!-- /.modal -->